package com.world.lzh.task;/**
 * @Author liuzihong
 * @Date 2022/4/26 13:57
 * @Version 1.0
 */

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @Author lzh
 * @Date 2022/4/26 - 13:57
 * @Description
 * @Version 1.0.0
 **/
@Component
public class TaskTest {

    @Scheduled(cron = "0/1 * * * * ?")
    public void test() {
        System.out.println("执行定时任务的时间是："+ LocalDateTime.now());
    }
}
